<template>
  <div class="not-found">
    <h1>404</h1>
    <p>页面不存在</p>
    <button @click="goBack">返回主页</button>
  </div>
</template>

<script>

import {useRouter} from "vue-router/composables";

export default {
  name:'NotFound',
  setup() {
    const router = useRouter();

    const goBack = () => {
      router.push('/home');
    };

    return {
      goBack,
    };
  },
};
</script>

<style scoped>
.not-found {
  text-align: center;
  margin-top: 100px;
}

h1 {
  font-size: 100px;
  margin-bottom: 20px;
}

p {
  font-size: 20px;
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
</style>
